import request from '@/utils/request';

export function getCveGroupList(data) {
    return request({
        url: '/group/cve/list',
        method: 'get',
        params: data
    })
}

export function createCveGroup(data) {
    return request({
        url: '/group/cve/created',
        method: 'post',
        data
    })
}

export function getCveList(data) {
    return request({
        url: '/cveAllList',
        method: 'get',
        params: data
    })
}

export function getGroupCveList({id, ...data}) {
    return request({
        url: `/group/cve/query/group/${id}`,
        method: 'get',
        params: data
    })
}

export function deleteCveGroup(id) {
    return request({
        url: `/group/cve/delete/${id}`,
        method: 'post'
    })
}

export function issueByCve(data) {
    return request({
        url: '/cve/autoissue',
        method: 'post',
        data
    })
}

export function deleteGroupCve(data) {
    return request({
        url: '/group/cve/delete/cve/',
        method: 'post',
        data
    })
}

export function createGroupCve({id, data}) {
    return request({
        url: `/group/cve/created/cve/${id}`,
        method: 'post',
        data
    })
}

export function issueByGroup(id) {
    return request({
        url: `/cve/group/autoissue/${id}`,
        method: 'post'
    })
}

export function getGroupCve(id) {
    return request({
        url: `/group/cve/query/cveList/${id}`,
        method: 'get',
    })
}

export function updateCveGroup(data) {
    return request({
        url: '/group/cve/update',
        method: 'post',
        data
    })
}

export function getNoExistCve({id, ...data}) {
    return request({
        url: `/group/cve/query/noExistCve/${id}`,
        method: 'get',
        params: data
    })
}